home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun 1986 January & February / rerun-1986-01-02.d64 / word jumbler 64 (.txt) < prev   
Commodore BASIC  |  2022-09-20  |  5KB  |  115 lines

  1. 10 dimd$(23),ts(5),w$(20),l1(12),l2(12)
  2. 20 d$(0)="":forx=1to23:d$(x)=d$(x-1)+"":next:c=54272:forx=1to160:readw$:next
  3. 30 forx=1to12:readl1(x):next:print"[147]":poke53280,0:poke53281,0:poke646,1
  4. 40 printd$(12)tab(17)"whatzit":forx=15to1step-1:poke646,x
  5. 50 printd$(10)tab(15)"           ":fory=1to3:printtab(15)" "tab(25)" ":next
  6. 60 printtab(15)"           ":printd$(8)tab(13)"               "
  7. 70 fory=1to7:printtab(13)" "tab(27)" ":next:printtab(13)"               "
  8. 80 printd$(6)tab(11)"                   ":fory=1to11
  9. 90 printtab(11)" "tab(29)" ":next:printtab(11)"                   "
  10. 100 printd$(4)tab(9)"                       ":fory=1to15
  11. 110 printtab(9)" "tab(31)" ":next:printtab(9)"                       ":next
  12. 120 forx=ctoc+23:pokex,0:next:pokec+24,15:pokec+5,10:pokec+6,10
  13. 130 readh:ifh=0then160
  14. 140 readl:pokec,l:pokec+1,h:pokec+4,17:forx=1to100:next:pokec+4,16
  15. 150 forx=1to75:next:goto130
  16. 160 print"[147]":poke53280,2:poke53281,3:poke646,6:printd$(2)tab(6)"i'm hungry"
  17. 170 printtab(6)"music makers":printtab(6)"people parts"
  18. 180 printtab(6)"pretty petals":printtab(6)"home sweet home"
  19. 190 printtab(6)"how's the weather?":printtab(6)"all work and no play"
  20. 200 printtab(6)"two legs, four legs, no legs":poke646,2
  21. 210 printtab(6)"move cursor with joystick...."
  22. 220 printtab(7)"press fire button to select":op=1108:pokeop,160:pokeop+c,1
  23. 230 forx=1to100:next:if(peek(56320)and16)=0then290
  24. 240 j=15-(peek(56320)and15):ifj=1thendi=-80:goto270
  25. 250 ifj=2thendi=80:goto270
  26. 260 goto230
  27. 270 np=op+di:ifnp<1108ornp>1668then230
  28. 280 pokenp+c,1:pokeop,32:pokenp,160:pokeop+c,3:op=np:goto230
  29. 290 restore:ca=(op-1028)/80:oncagosub300,310,320,330,340,350,360,370:goto380
  30. 300 return
  31. 310 forx=1to20:readw$:next:return
  32. 320 forx=1to40:readw$:next:return
  33. 330 forx=1to60:readw$:next:return
  34. 340 forx=1to80:readw$:next:return
  35. 350 forx=1to100:readw$:next:return
  36. 360 forx=1to120:readw$:next:return
  37. 370 forx=1to140:readw$:next:return
  38. 380 forx=1to20:readw$(x):next
  39. 390 print"[147]":poke53280,0:poke53281,0:poke646,1
  40. 400 printd$(18)tab(4)"word"tab(17)"score"tab(24)"bonus"tab(31)"total"
  41. 410 wc=0:tc=0:cu=18
  42. 420 wc=wc+1:ifwc>5then800
  43. 430 tc=tc+2:poke646,tc:printd$(2)tab(11)"                 ":forx=1to3
  44. 440 printtab(11)"     ":printtab(11)" "tab(27)" "
  45. 450 printtab(11)"     ":printtab(11)"             ":next
  46. 460 printtab(11)"[145]                 ":poke646,13
  47. 470 forx=1to12:l2(x)=l1(x):next:lp=0:wp$=""
  48. 480 wn=int(rnd(1)*20)+1:ifw$(wn)=""then480
  49. 490 lp=lp+1:iflp>len(w$(wn))then520
  50. 500 x=int(rnd(1)*12)+1:ifl2(x)=0then500
  51. 510 pokel2(x),asc(mid$(w$(wn),lp,1))-64:pokel2(x)+c,14:l2(x)=0:goto490
  52. 520 x=int(rnd(1)*12)+1:ifl2(x)=0then520
  53. 530 op=l2(x):pokeop,42:pokeop+c,7:ti$="000000"
  54. 540 forx=1to60:next:if(peek(56320)and16)=0then620
  55. 550 j=15-(peek(56320)and15):ifj=1thendi=-40:goto600
  56. 560 ifj=2thendi=40:goto600
  57. 570 ifj=4thendi=-1:goto600
  58. 580 ifj=8thendi=1:goto600
  59. 590 goto540
  60. 600 np=op+di:ifpeek(np)<>32then540
  61. 610 pokenp+c,7:pokeop,32:pokenp,42:pokeop+c,0:op=np:goto540
  62. 620 ifpeek(op-40)>26then540
  63. 630 wp$=wp$+chr$((peek(op-40))+64):printd$(1)tab(11)wp$:pokeop-40,32
  64. 640 pokeop-40+c,0:iflen(wp$)<>len(w$(wn))then550
  65. 650 t=val(ti$):poke646,10:pokeop,32:pokeop+c,0:ifwp$=w$(wn)then680
  66. 660 forx=ctoc+24:pokex,0:next:forx=1to10:pokec+24,15:forq=1to3:next
  67. 670 pokec+24,0:forq=1to3:next:next:goto690
  68. 680 pokec+24,15:pokec,10:pokec+1,100:pokec+5,9:pokec+6,9:pokec+4,17:pokec+4,16
  69. 690 cu=cu+1:printd$(cu)tab(4)w$(wn);:sc=0:ifwp$=w$(wn)thensc=len(wp$)
  70. 700 printtab(19);:ifsc<10thenprint" ";
  71. 710 printsc;tab(26);:bo=0:ift<30thenbo=30-t
  72. 720 ifsc=0thenbo=0
  73. 730 ifbo<10thenprint" ";
  74. 740 printbo;tab(33);:ts(wc)=sc+bo:ifts(wc)<10thenprint" ";
  75. 750 printts(wc):poke646,15
  76. 760 printd$(16)tab(11)"press fire button":forx=1to50:next
  77. 770 printd$(16)tab(11)"                 ":forx=1to30:next
  78. 780 if(peek(56320)and16)=16then760
  79. 790 printd$(1)tab(11)"            ":w$(wn)="":goto420
  80. 800 printd$(23):forx=1to15:print:next:poke646,8
  81. 810 printd$(12)tab(16)"game over":gt=0:forx=1to5:gt=gt+ts(x):next
  82. 820 printtab(13)"grand total"gt:ifgt>hsthenhs=gt
  83. 830 poke646,3:printtab(13)"high score"hs:poke646,12
  84. 840 printtab(11)"play again? yes/no":op=1807:pokeop,30:pokeop+c,3
  85. 850 poke646,13:printtab(10)"move ";:poke646,3:print"^";:poke646,13
  86. 860 print" with joystick":printtab(7)"press fire button to select"
  87. 870 if(peek(56320)and16)=0then930
  88. 880 j=15-(peek(56320)and15):ifj=4thendi=-4:goto910
  89. 890 ifj=8thendi=4:goto910
  90. 900 goto870
  91. 910 np=op+di:ifnp<1807ornp>1811then870
  92. 920 pokenp+c,3:pokeop,32:pokenp,30:pokeop+c,0:op=np:goto870
  93. 930 ifop=1807then160
  94. 940 sys64759
  95. 950 datahamburger,pizza,cabbage,carrot,spaghetti,strawberry,pineapple,raisin
  96. 960 datacheese,eggplant,potato,banana,cucumber,yogurt,bologna,marshmallow,chili
  97. 970 dataonion,squash,rhubarb,guitar,banjo,violin,drum,saxophone,trumpet
  98. 980 dataclarinet,piano,accordion,harmonica,harp,mandolin,flute,xylophone,organ
  99. 990 datacello,tuba,trombone,cymbal,tambourine,shoulder,ankle,heart,stomach
  100. 1000 datakidney,cornea,liver,spleen,brain,elbow,finger,tooth,aorta,knuckle
  101. 1010 datawrist,lung,intestine,foot,neck,tongue,orchid,petunia,zinnia,marigold
  102. 1020 dataaster,rose,peony,tulip,crocus,amaryllis,hyacinth,iris,pansy,gloxinia
  103. 1030 databegonia,snapdragon,geranium,daisy,violet,lily,stereo,carpet
  104. 1040 datasilverware,telephone,television,shelf,toaster,curtain,clock,cabinet
  105. 1050 datachair,stove,blanket,pillow,table,lamp,calendar,clothing,thermostat
  106. 1060 databroom,tornado,lightning,thunder,snow,sleet,rainbow,hurricane,humidity
  107. 1070 datatemperature,barometer,forecast,cloud,flood,hail,front,drought,blizzard
  108. 1080 datawind,warning,frost,attorney,surgeon,banker,artist,writer,carpenter
  109. 1090 dataengineer,reporter,architect,librarian,nurse,chef,politician,teacher
  110. 1100 dataplumber,janitor,farmer,clerk,athlete,electrician,turtle,cougar
  111. 1110 datarattlesnake,salmon,ostrich,peacock,zebra,skunk,buffalo,kangaroo,lizard
  112. 1120 datahummingbird,chimpanzee,antelope,sheep,dolphin,squirrel,raccoon,gopher
  113. 1130 datawoodpecker,1197,1201,1205,1209,1357,1361,1365,1369,1517,1521,1525,1529
  114. 1140 data22,96,44,193,89,131,25,30,50,60,100,121,28,49,56,99,112,199,0,0
  115.